package {
	import flash.display.*;
	import flash.events.*;
	import flash.geom.*;
	import flash.media.*;
	public class IsoSprite extends Sprite {
		private var x_: Number = 0;
		public function get ix(): Number { return x_; }
		public function set ix(val: Number): void { x_ = val; update() }
		private var y_: Number = 0;
		public function get iy(): Number { return y_; }
		public function set iy(val: Number): void { y_ = val; update() }
		private var z_: Number = 0;
		public function get iz(): Number { return z_; }
		public function set iz(val: Number): void { z_ = val; update() }
		private var depth_: Number = 0;
		public function get depth(): Number { return depth_; }
		
		public var isoParent: IsoContainer;
		private function update(): void {
			depth_ = x_ + y_;
			x = (x_ - y_) * 16;
			y = (x_ + y_) * 8 - z_ * 16;
			if (isoParent != null) isoParent.resort(this);
		}
	}
}